﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dialog.aspx.cs" Inherits="dialog" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .dialog
        {
            width: 200px;
            height: 200px;
            background-color: white;
            border: 1px solid black;
        }
    </style>
    <script type="text/javascript" src="/scripts/NinJa.js"></script>
    <script type="text/javascript" src="/scripts/NinJaVisuals.js"></script>
    <script type="text/javascript" src="/scripts/NinJaControls.js"></script>
    <script type="text/javascript">
        Dialog.Color = new Color("#e0e0ff");
        Dialog.Opacity = .8;
        Page.OnLoad.Add(function () {
            
            $Dialog("Dlg1").OnDialogClose.Add(function (e) {
                if (e.Data == true) alert("Selected Ok!");
                else if (e.Data == false) alert("Selected Cancel!");
                else { alert("Don't do anything?!"); e.CancelEvent = true;  e.Handled = true; }


            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <a onclick="$Dialog('Dlg1').Show()">Click to show dialog.</a>
        <a onclick="$Dialog('Wiz1').Show()">Click to show wizard.</a>
    <div class="dialog" id="Dlg1">
        Example dialog.<br />
        <input type="button" onclick="Dialog.Hide(true)" value="OK" />
        <input type="button" onclick="Dialog.Hide(false)" value="Cancel" />
        <input type="button" onclick="Dialog.Hide(null)" value="Don't Do Anything" />
    </div>
    <div class="dialog" id="Wiz1">
        Wizard 1
        <input type="button" onclick="Dialog.Hide()" value="Cancel" />
        <input type="button" onclick="$Dialog('Wiz2').Show()" value="Next" />
    </div>
    <div class="dialog" id="Wiz2">
        Wizard 2
        <input type="button" onclick="$Dialog('Wiz1').Show()" value="Previous" />
        <input type="button" onclick="$Dialog('Wiz3').Show()" value="Next" />
    </div>
    <div class="dialog" id="Wiz3">
        Wizard 3
        <input type="button" onclick="$Dialog('Wiz2').Show()" value="Previous" />
        <input type="button" onclick="Dialog.Hide()" value="Finish" />
    </div>
    </form>
</body>
</html>
